const initValue = {
  token: '',
  refresh_token: '',
}

export default function reducer(state = initValue, action) {
  if (action.type === 'login/saveToken') {
    return action.payload
  }
  if (action.type === 'login/logout') {
    return {}
  }
  return state
}
